package com.xbf.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;


@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("user")
public class User {

    private static final long serialVersionUID = 1L;

    @TableId(value = "u_id",type = IdType.AUTO)
    @JsonProperty("uId")
    private Integer uId;  //用户id

    @JsonProperty("uName")
    private String uName;  //用户名

    @JsonProperty("uPassword")
    private String uPassword;  //密码

    @JsonProperty("uSex")
    private String uSex;  //性别

    @JsonProperty("uEmail")
    private String uEmail;  //邮箱

    @JsonProperty("uPhone")
    private String uPhone;  //电话

    @JsonProperty("uBirthday")
    @JsonFormat(pattern = "yyyy-MM-dd") // 格式化日期
    private Date uBirthday;  //生日

}
